package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HistoryDataMapper;
import com.ruoyi.system.domain.HistoryData;
import com.ruoyi.system.service.IHistoryDataService;

/**
 * 历史数据表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-16
 */
@Service
public class HistoryDataServiceImpl implements IHistoryDataService 
{
    @Autowired
    private HistoryDataMapper historyDataMapper;

    /**
     * 查询历史数据表
     * 
     * @param id 历史数据表主键
     * @return 历史数据表
     */
    @Override
    public HistoryData selectHistoryDataById(Long id)
    {
        return historyDataMapper.selectHistoryDataById(id);
    }

    /**
     * 查询历史数据表列表
     * 
     * @param historyData 历史数据表
     * @return 历史数据表
     */
    @Override
    public List<HistoryData> selectHistoryDataList(HistoryData historyData)
    {
        return historyDataMapper.selectHistoryDataList(historyData);
    }

    /**
     * 新增历史数据表
     * 
     * @param historyData 历史数据表
     * @return 结果
     */
    @Override
    public int insertHistoryData(HistoryData historyData)
    {
        return historyDataMapper.insertHistoryData(historyData);
    }

    /**
     * 修改历史数据表
     * 
     * @param historyData 历史数据表
     * @return 结果
     */
    @Override
    public int updateHistoryData(HistoryData historyData)
    {
        return historyDataMapper.updateHistoryData(historyData);
    }

    /**
     * 批量删除历史数据表
     * 
     * @param ids 需要删除的历史数据表主键
     * @return 结果
     */
    @Override
    public int deleteHistoryDataByIds(Long[] ids)
    {
        return historyDataMapper.deleteHistoryDataByIds(ids);
    }

    /**
     * 删除历史数据表信息
     * 
     * @param id 历史数据表主键
     * @return 结果
     */
    @Override
    public int deleteHistoryDataById(Long id)
    {
        return historyDataMapper.deleteHistoryDataById(id);
    }

    @Override
    public List<HistoryData> selectHistoryDataListByAreaId(Long areaId) {
        return historyDataMapper.selectHistoryDataListByAreaId(areaId);
    }

    @Override
    public List<HistoryData> selectHistoryDataListByMineId(Long mineId) {
        return historyDataMapper.selectHistoryDataListByMineId(mineId);
    }

    @Override
    public List<HistoryData> selectHistoryDataListByDeviceId(Long deviceId) {
        return historyDataMapper.selectHistoryDataListByDeviceId(deviceId);
    }
}
